<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/jsp/ningbo/common.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <meta name="format-detection" content="address=no;">
    <title>在线申请</title>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/jsp/ningbo/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/jsp/ningbo/css/job.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/weui/0.4.3/style/weui.min.css">
	<link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/0.8.0/css/jquery-weui.min.css">
	<script src="<%=request.getContextPath()%>/jsp/ningbo/js/jquery-1.9.1.min.js"></script>
	<script src="//cdn.bootcss.com/jquery-weui/0.8.0/js/jquery-weui.min.js"></script>
</head>
<body>
	<%-- <!-- head start -->
    <header id="header">
            <span><a id="returnButton" onClick="javascript :window.history.back(); return false;"><img src="<%=request.getContextPath()%>/jsp/ningbo/images/arrow_return.png" width="28" height="28"></a></span>
            <h1>在线申请</h1>
    </header>
    <!-- head end -->
    <div class="mt50"></div> --%>
	<!-- form start -->
	<form action="<%=request.getContextPath()%>/nbwx/m/to_jy_zxsq" id="jyform" method="post">
    <div class="content">
    	<h5 class="tit_area">选择申报地点</h3>
        <ul class="list_form">
            <li class="noline">
            	<span class="text">申报地点</span> 
            	<div class="wid68" style="	background:url(images/arrow_go.png) no-repeat 97% 50%;
	">
            	<div class="weui_cell_bd weui_cell_primary">
            	 <select id="sbdd_select" class="weui_select" style="height:26px; line-height:26px; padding-left:0">
                	<option value="">请选择申报地点</option>
                </select>
                </div>
                </div>
            </li>
            
            <li class="noline">
            	<span class="text">毕业院校</span>
                <span class="wid68">
                	<input class="wid68" id="byyx" type="text" placeholder="请填写院校全称" onmouseover=this.focus();this.select(); onClick="this.value='';this.style.color='#000000'" style="color:#999">
                </span>
            </li>
        </ul>
        <div class="mid_btn">
            <a onclick="to_cy_zxsq()" class="btn btn-primary btn-block btn_blue">
              下一步
            </a>
        </div>
        <div class="prompt2">
        	<h3>下列情况请直接到窗口申报：</h3>
            <p>1、企业代为申报；</p>
            <p>2、高校毕业生在同一法人代表企业之间或同一集团公司控股50%以上的子公司间流动就业，视作同一家企业就业，由集团公司提出申报；</p>
            <p>3、高校毕业生在兼并重组或合并分立企业就业的，兼并重组或合并分立前后的企业可视作同一家企业。</p>
        </div>
    </div>	
    <!-- form end -->
    <input type="hidden" id="sbddId">
    <input type="hidden" name="sbddName" id="sbddName">
    <input type="hidden" name="area_name" id="area_name">
    <input type="hidden" name="byyx" id="byyx1">
    </form>
</body>
<script type="text/javascript">
    
    	//选择区县街道产生联动效果
    	$("#sbdd_select").change(function (){
    		var qx = $("#sbdd_select").val();
    		var qxName = $("#sbdd_select").find("option:selected").text();
    		if(!(!qx)){
        		$("#sbddId").val(qx);
        		$("#sbddName").val(qxName);
    		}
    		else{
        		$("#sbddId").val("");
        		$("#sbddName").val("");
    		}
    	});
    	
    	//跳转到在线申请提交页面
    	function to_cy_zxsq(){
    		var sbddId = $("#sbddId").val();
    		var sbddName = $("#sbddName").val();
    		var byyx = $("#byyx").val();
    		
    		
    		//如果街道id为空，区县id不为空，街道id为地域id
			if(!sbddId){
				$.alert("请选择申报地点");
				return;
			}
    		if(!byyx){
    			$.alert("请填写所属院校");
    			return
    		}
    		$("#area_name").val(sbddName);
    		$("#byyx1").val(byyx);
    		//window.location.href=ctxPath+"/nbwx/m/to_jy_zxsq?area_name="+sbddName+"&area_id="+sbddId+"&byyx="+byyx;
    		$("#jyform")[0].submit();
    	}
    	
    	window.onload = function (){
    		
    		//区县地区选择
    		var data = {};
    		data.lx = 'GX_JYBT_01';
    		data.hm = '';
    		data.area_level = '2';
    		data.type='0';
    		$.ajax({
    			url :ctxPath+'/nbwx/m/area_select.json',
    			type:'post',
    			data: data,
    			dataType:'html',
    			ifModified:true,
    			cache:false,
    			success:function(data){
    				data = $.parseJSON(data);
    				if (data.resultCode >=0){
    					var lists = data.model;
     					$("#qx_select").empty();	 
    					$("#qx_select").append("<option value=''>请选择申报地点</option>");	
    					$.each(lists,function(index,domEle){
    						var areaName;
    						var areaId;
    						 $.each(domEle,function(name,value){
    							
    							if ("AAB300"==name || "aab300"==name){
    								areaName=value;
    							}
    							if ("BSC001"==name || "bsc001"==name){
    								areaId=value;
    							}
    						})
    						$("#sbdd_select").append("<option value="+areaId+">"+areaName+"</option>");	
    					})
    				}
    				else{
    					$.alert("失败")
    				}
    			}
    		});
    		
    	}
    </script>
</html>